package main

import "fmt"

func main() {
	i1 := uint8(1)
	var i2 uint16 = 12
	fmt.Println(i1)
	fmt.Println(i2)

	//强制类型转换
	a1 := F1(A1)
	fmt.Println(a1(1, 2))

	//定义后赋值
	var a2 F2
	//隐式类型转换
	a2 = A1
	fmt.Println(a2(1, 2))
}

type F1 func(a, b int) int
type F2 func(a, b int) int

func A1(a, b int) int {
	return a + b
}
